<template>
	<view class="headerTop">
		<!-- 头部 -->
		<uni-icons type="back" size="30" @click="back" class="iconClass" color="#fff"></uni-icons>
		<view class="title">
			<slot name="title"></slot>
		</view>
	</view>
</template>
<script>
	export default ({
		data() {
			return {}
		},
		methods: {
			// 返回上一页
			back() {
				uni.navigateBack();
			},
		},
	})
</script>
<style lang="scss" scoped>
	.headerTop {
		width: 100%;
		height: 88rpx;
		display: flex;
		align-items: center;
		margin-top: 60rpx;
		position: relative;

		.iconClass {
			margin-left: 34rpx;
		}

		.title {
			position: absolute;
			top: 50%;
			left: 50%;
			font-size: 40rpx;
			transform: translate(-50%, -50%);
			font-family: PingFang SC-Bold, PingFang SC;
			font-weight: bold;
			color: #FFFFFF;
		}
	}
</style>